from django.core.validators import MinLengthValidator
from django.db import models

# Create your models here.


class Feedback(models.Model):
    name = models.CharField(max_length=7, validators=[MinLengthValidator(2)])
    surname = models.CharField(max_length=7)
    feedback = models.TextField()
    rating = models.PositiveIntegerField()

    def __str__(self) -> str:
        return self.name
